import axios from "axios";

const api = {
    generateKey(duration, note, authKey) {
        axios.get("/api",{duration: duration, note: note, auth: authKey})
        .then(res => {
            if(res.status == 200){
                return res.data.parseJSON().key;
            }
        })
        .catch(err => {
            console.error(err); 
        })
    }
}

export default api